{include file="$g_template/_fronthead.tpl"}
<div id="wrap_3">
		<div id="header">
			<div class="logo"><img src="{$g_image}/logo.png"></div>
			<div class="welcome"><img src="{$g_image}/welcome.png"></div>
		</div>
        
        {include file="$g_template/_mainmenu.tpl"}
        
	<div id="web_content3">
		<div class="title_content_detail">Payment<br><span style="font-size: 16px;">{$today}</span></div>
		<div class="line"></div>
		<div id="area_title_description">
			<div class="text_title_description">
				<p>
					<span class="text_black_title">Payment ID: </span><span class="text_red_title">{$paymentId}</span>	
				</p>
			</div>
			<div class="text_title_images"><span style="float:right;"><img src="{$g_image}/{$img}"></span></div>
		</div>
			
		<div class="showdetail"><br>
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; font-family: sans-serif;">
				<tr>
					<td class="UnderLine"  colspan="4" align="center"><span class="text_black_bold">ข้อมูล Pre-auth</span></td>
				</tr>
				<tr>
					<td align="left">&nbsp;</td>
				</tr>
				<tr>
					<td align="left"><span style="margin-left:20px;">Pre-auth เลขที่ : {$preauthData.preauth_id}</span></td>
					<td align="left"><span style="margin-left:20px;">วันที่ทำ Pre-auth : {$preauthData.preauth_datetime}</span></td>
				</tr>
				<tr>
					<td align="left"><span style="margin-left:20px;">ชื่อผู้ทำ Pre-auth : {$_profile->user_prename}{$_profile->user_name}&nbsp;{$_profile->user_surname}</span></td>
					<td align="left"><span style="margin-left:20px;">รหัสผู้ใช้ : {$_profile->userid}</span></td>
				</tr>
				<tr>
					<td align="left"><span style="margin-left:20px;">หน่วยงาน : {$_profile->group_name}</span></td>
					<td align="left"><span style="margin-left:20px;">ตำแหน่ง : {$_profile->usertype_description}</span></td>
				</tr>
				<tr>
					<td align="left">&nbsp;</td>
				</tr>
			</table>
			
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:15px; font-family: sans-serif;">
				<tr>
					<td class="UnderLine"  colspan="4" align="center"><span class="text_black_bold">ข้อมูลกรมธรรม์</span></td>
				</tr>
				<tr>
					<td colspan="4" align="center">&nbsp;</td>
				</tr>
				<tr>
					<td align="right">ชื่อผู้เอาประกัน :</td>
					<td>{$policyData.name}  {$policyData.surname}</td>
					<td align="right">บัตรประชาชน: </td>
					<td>{$policyData.natid}</td>
				</tr>
				<tr>
					<td align="right">เลขที่่กรมธรรม์ :</td>
					<td>{$policyData.policy_no}</td>
					<td align="right">เลขที่บัตรประกัน :</td>
					<td>{$policyData.cardno}</td>
				</tr>
				<tr>
					<td align="right">วันเริ่มคุ้มครอง :</td>
					<td>{$policyData.effective}</td>
					<td align="right">วันสิ้นสุดความคุ้มครอง :</td>
					<td>{$policyData.expiry}</td>
				</tr>
				<tr>
					<td align="right">แผนความคุ้มครอง :</td>
					<td>{$policyData.plan}</td>
					<td align="right">&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td align="right">OPD :</td>
					<td>1,000 Per Visit/Day(30/Year)</td>
					<td align="right">ER :</td>
					<td>{$policyData.er}</td>
				</tr>
				<tr>
					<td align="right">OPD คงเหลือ :</td>
					<td>30 ครั้ง</td>
					<td align="right">R&B :</td>
					<td>2,000 Per Day</td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
			</table>
			
			<table width="700" align="center" border="0" cellpadding="3" cellspacing="0" style="font-size:16px; font-family: sans-serif;">
				<tr>
					<td class="UnderLine"  colspan="5" align="center"><span class="text_black_bold">ระบุยอดค่าใช้จ่าย</span></td>
				</tr>
				<tr>
					<td  width="25%" align="center">&nbsp;</td>
					<td  width="25%" align="center">&nbsp;</td>
					<td  width="25%" align="center">&nbsp;</td>
					<td  width="25%" align="center">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="4">
						<div class="payment_exp_left">
							<ul>
								<li><label>Accident Date : </label><input type="text" name="txt_acc_date" id="txt_acc_date" style="width: 70px; text-align: center;" readonly="true" value="{$default_date}">
								<select id="acc_hour" name="acc_hour">
									{foreach from=$arr_hour item=item}
										<option value="{$item}" {if $default_hour eq $item}selected{/if}>{$item}</option>
									{/foreach}
								</select>
								<select id="acc_min" name="acc_min">
									{foreach from=$arr_min item=item}
										<option value="{$item}" {if $default_min eq $item}selected{/if}>{$item}</option>
									{/foreach}
								</select></li>
								<li>
									<label>Last Accident : </label>
									<select id="accList" name=accList>
										{foreach from=$accList item=item}
				                        	<option value={$item.acc_date}>{$item.acc_date}</option>
				                         {/foreach}
									</select>
								</li>
								<li><label>Admission Date : </label><input type="text" name="txt_admis_date" id="txt_admis_date" style="width: 70px; text-align: center;" readonly="true" value="{$default_date}">
								<select id="adm_hour" name="adm_hour">
									{foreach from=$arr_hour item=item}
										<option value="{$item}" {if $default_hour eq $item}selected{/if}>{$item}</option>
									{/foreach}
								</select>
								<select id="adm_min" name="adm_min">
									{foreach from=$arr_min item=item}
										<option value="{$item}" {if $default_min eq $item}selected{/if}>{$item}</option>
									{/foreach}
								</select></li>
								<li>
									<label>Cover List : </label>
									<select id="cover_type" name="cover_type">
										{foreach from=$claimGetCover item=item}
				                        	<option value={$item.covertype}>{$item.coverdesc}</option>
				                         {/foreach}
									</select>
								</li>
							</ul>
						</div>
						<div class="payment_exp_right">
							<ul>
								<li><label>Charge : </label><input type="text" name="txt_charge" id="txt_charge" value="0" style="width: 100px; text-align: right;">&nbsp;บาท</li>
								<li>
									<label>Discount : </label><input type="text" name="txt_discount" id="txt_discount" value="0" style="width: 100px; text-align: right;">&nbsp;บาท&nbsp;<input type="button" class="btncal" name="calculate" id="calculate" value="Calculate" onclick="_renderCalculate();">
								</li>
								<li><label>Deductible Remain : </label><input type="text" name="txt_deductible" id="txt_deductible" style="width: 100px; text-align: right;">&nbsp;บาท</li>
								<li><label>Co-Payment Remain : </label><input type="text" name="txt_co_payment" id="txt_co_payment" style="width: 100px; text-align: right;">&nbsp;บาท</li>
								<li><br><label><font color="red">Pre Approved : </font></label><input type="text" name="txt_pre_approved" id="txt_pre_approved" style="width: 100px; text-align: right;">&nbsp;บาท</li>
								<li><label><font color="red">Non Covered : </font></label><input type="text" name="txt_non_covered" id="txt_non_covered" style="width: 100px; text-align: right;">&nbsp;บาท</li>
							</ul>
						</div>
					</td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="4" align="left">สาเหตุการรักษา :<br>
					<textarea name="tar_remark" id="tar_remark" rows="12" cols="85"></textarea>
					</td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="4" align="center">
						<input type="hidden" name="hid_payment_id" id="hid_payment_id" value="{$paymentId}">
						<input type="hidden" name="hid_user_id" id="hid_user_id" value="{$_profile->userid}">
						<input type="hidden" name="hid_preauth_id" id="hid_preauth_id" value="{$preauthData.preauth_id}">
						<input type="hidden" name="hid_policy_no" id="hid_policy_no" value="{$policyData.policy_no}">
						<input type="hidden" name="hid_payment_datetime" id="hid_payment_datetime" value="{$payment_datetime}">
						<input type="hidden" name="hid_payment_status" id="hid_payment_status" value="1">
						<input type="hidden" name="hid_customer_type" id="hid_customer_type" value="{$policyData.customer_type}">
						<input type="hidden" name="hid_policy_id" id="hid_policy_id" value="{$policyData.policyid}">
						<input type="hidden" name="hid_customer_type_desc" id="hid_customer_type_desc" value="{$policyData.customer_type_desc}">
						<input type="submit" name="btn_submit" value="ยืนยัน" style="width: 100px;" onclick="_renderPaymentConfirm();">
						<a id="link_payment_list"></a>
						<!-- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" name="btn_print" value="Print" style="width: 100px;"> -->
					</td>
				</tr>
				<tr>
					<td colspan="4">&nbsp;</td>
				</tr>
			</table>
			
		</div>
		
	</div>
{include file="$g_template/_frontfoot.tpl"}